<?php
/**
 * Created by PhpStorm.
 * User: 84071
 * Date: 2018-10-04
 * Time: 11:57
 */
namespace app\api\controller;

use app\common\controller\Apibase;
use app\common\controller\Upload;
use app\common\model\Advertising as cxModel;

class Advertising extends Apibase{

    public function getOne($id){
        $cxmodel = new cxModel();
        $upmodel = new Upload();
        $one = $cxmodel->get_one($id);
        if($one == false){
           return null;
        }
        $one = $upmodel->editadd($one,false);
        return json($one);
    }
}